unit DbfUtils;

interface

uses SysUtils, Classes;

function SetDbfCodepage(FileName: string; OEM: boolean): boolean;

implementation

function SetDbfCodepage(FileName: string; OEM: boolean): boolean;
var
  st: TFileStream;
  cp: byte;
begin
  result := False;
  if OEM then cp := 101 else cp := 201;
  st := TFileStream.Create(FileName, fmOpenWrite);
  try
    st.Seek(29, 0);
    st.Write(cp, 1);
    result := True;
  finally
    st.Free;
  end;
end;

end.
